<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><script type="text/javascript" src="https://cdn.jsdelivr.net/gh/opencobra/cobratoolbox@ffa0229fc0c01c9236bb7e961f65712443277719/latest/_static/js/iframeResizer.contentWindow.min.js"></script><meta http-equiv="Content-Type" content="text/html; charset=utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge,IE=9,chrome=1"><meta name="generator" content="MATLAB 2021a"><title>Constraint-based modelling concepts</title><style type="text/css">.rtcContent { padding: 30px; } .S0 { margin: 3px 10px 5px 4px; padding: 0px; line-height: 28.8px; min-height: 0px; white-space: normal; color: rgb(213, 80, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 24px; font-weight: normal; text-align: left;  }
.S1 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S2 { margin: 20px 10px 5px 4px; padding: 0px; line-height: 20px; min-height: 0px; white-space: normal; color: rgb(60, 60, 60); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 20px; font-weight: bold; text-align: left;  }
.S3 { margin: 2px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: center;  }
.CodeBlock { background-color: #F7F7F7; margin: 10px 0 10px 0;}
.S4 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px 4px 0px 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S5 { color: rgb(64, 64, 64); padding: 10px 0px 6px 17px; background: rgb(255, 255, 255) none repeat scroll 0% 0% / auto padding-box border-box; font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px; overflow-x: hidden; line-height: 17.234px;  }
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsErrorElement {    min-height: 18px;    max-height: 250px;    overflow: auto;}
.embeddedOutputsErrorElement.inlineElement {}
.embeddedOutputsErrorElement.rightPaneElement {}
/* Styling that is common to warnings and errors is in diagnosticOutput.css */.embeddedOutputsWarningElement{    min-height: 18px;    max-height: 250px;    overflow: auto;}
.embeddedOutputsWarningElement.inlineElement {}
.embeddedOutputsWarningElement.rightPaneElement {}
/* Copyright 2015-2019 The MathWorks, Inc. *//* In this file, styles are not scoped to rtcContainer since they could be in the Dojo Tooltip */.diagnosticMessage-wrapper {    font-family: Menlo, Monaco, Consolas, "Courier New", monospace;    font-size: 12px;}
.diagnosticMessage-wrapper.diagnosticMessage-warningType {    color: rgb(255,100,0);}
.diagnosticMessage-wrapper.diagnosticMessage-warningType a {    color: rgb(255,100,0);    text-decoration: underline;}
.diagnosticMessage-wrapper.diagnosticMessage-errorType {    color: rgb(230,0,0);}
.diagnosticMessage-wrapper.diagnosticMessage-errorType a {    color: rgb(230,0,0);    text-decoration: underline;}
.diagnosticMessage-wrapper .diagnosticMessage-messagePart,.diagnosticMessage-wrapper .diagnosticMessage-causePart {    white-space: normal;}
.diagnosticMessage-wrapper .diagnosticMessage-stackPart {    white-space: normal;}
.embeddedOutputsTextElement,.embeddedOutputsVariableStringElement {    white-space: normal;    word-wrap:  initial;    min-height: 18px;    max-height: 250px;    overflow: auto;}
.textElement,.rtcDataTipElement .textElement {    padding-top: 3px;}
.embeddedOutputsTextElement.inlineElement,.embeddedOutputsVariableStringElement.inlineElement {}
.inlineElement .textElement {}
.embeddedOutputsTextElement.rightPaneElement,.embeddedOutputsVariableStringElement.rightPaneElement {    min-height: 16px;}
.rightPaneElement .textElement {    padding-top: 2px;    padding-left: 9px;}
.S6 { margin: 10px 10px 9px 4px; padding: 0px; line-height: 21px; min-height: 0px; white-space: normal; color: rgb(0, 0, 0); font-family: Helvetica, Arial, sans-serif; font-style: normal; font-size: 14px; font-weight: normal; text-align: left;  }
.S7 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S8 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S9 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 4px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S10 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px; padding: 6px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S11 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 1px solid rgb(233, 233, 233); border-bottom: 0px none rgb(0, 0, 0); border-radius: 4px 4px 0px 0px; padding: 6px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.S12 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 0px none rgb(0, 0, 0); border-radius: 0px; padding: 0px 45px 0px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }
.variableValue { width: 100% !important; }
.embeddedOutputsMatrixElement,.eoOutputWrapper .matrixElement {    min-height: 18px;    box-sizing: border-box;}
.embeddedOutputsMatrixElement .matrixElement,.eoOutputWrapper  .matrixElement,.rtcDataTipElement .matrixElement {    position: relative;}
.matrixElement .variableValue,.rtcDataTipElement .matrixElement .variableValue {    white-space: normal;    display: inline-block;    vertical-align: top;    overflow: hidden;}
.embeddedOutputsMatrixElement.inlineElement {}
.embeddedOutputsMatrixElement.inlineElement .topHeaderWrapper {    display: none;}
.embeddedOutputsMatrixElement.inlineElement .veTable .body {    padding-top: 0 !important;    max-height: 100px;}
.inlineElement .matrixElement {    max-height: 300px;}
.embeddedOutputsMatrixElement.rightPaneElement {}
.rightPaneElement .matrixElement,.rtcDataTipElement .matrixElement {    overflow: hidden;    padding-left: 9px;}
.rightPaneElement .matrixElement {    margin-bottom: -1px;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer,.eoOutputWrapper .matrixElement .valueContainer,.rtcDataTipElement .matrixElement .valueContainer {    white-space: nowrap;    margin-bottom: 3px;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis.hide,.embeddedOutputsMatrixElement .matrixElement .verticalEllipsis.hide,.eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis.hide,.eoOutputWrapper .matrixElement .verticalEllipsis.hide,.rtcDataTipElement .matrixElement .valueContainer .horizontalEllipsis.hide,.rtcDataTipElement .matrixElement .verticalEllipsis.hide {    display: none;}
.embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .verticalEllipsis, .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer.hideEllipses .horizontalEllipsis {    display:none;}
.embeddedOutputsMatrixElement .matrixElement .valueContainer .horizontalEllipsis,.eoOutputWrapper .matrixElement .valueContainer .horizontalEllipsis {    margin-bottom: -3px;}
.eoOutputWrapper .embeddedOutputsVariableMatrixElement .matrixElement .valueContainer {    cursor: default !important;}
/* * Ellipses as base64 for HTML export. */.matrixElement .horizontalEllipsis,.rtcDataTipElement .matrixElement .horizontalEllipsis {    display: inline-block;    margin-top: 3px;    /* base64 encoded version of images-liveeditor/HEllipsis.png */    width: 30px;    height: 12px;    background-repeat: no-repeat;    background-image: url("");}
.matrixElement .verticalEllipsis,.textElement .verticalEllipsis,.rtcDataTipElement .matrixElement .verticalEllipsis,.rtcDataTipElement .textElement .verticalEllipsis {    margin-left: 35px;    /* base64 encoded version of images-liveeditor/VEllipsis.png */    width: 12px;    height: 30px;    background-repeat: no-repeat;    background-image: url("");}
.S13 { border-left: 1px solid rgb(233, 233, 233); border-right: 1px solid rgb(233, 233, 233); border-top: 0px none rgb(0, 0, 0); border-bottom: 1px solid rgb(233, 233, 233); border-radius: 0px 0px 4px 4px; padding: 0px 45px 4px 13px; line-height: 17.234px; min-height: 18px; white-space: nowrap; color: rgb(0, 0, 0); font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 14px;  }</style></head><body><div class = rtcContent><h1  class = 'S0'><span>Constraint-based modelling concepts</span></h1><div  class = 'S1'><span style=' font-weight: bold;'>Note: This tutorial is a draft and needs completion. Contributions welcome!</span></div><h2  class = 'S2'><span>Author(s): Ronan Fleming</span><span style=' font-style: italic;'> </span></h2><h2  class = 'S2'><span>Reviewer(s): </span></h2><h2  class = 'S2'><span>INTRODUCTION</span></h2><div  class = 'S1'><span style=' font-style: italic;'>The purpose of the introduction is to enable readers to make a decision as to the suitability of the protocol to their problem. Initially you should introduce the technique under discussion. Include references to key papers where the protocol has been used previously, including those published by your own group or to reviews that discuss applications of the technique (see below for how to cite references).</span></div><h2  class = 'S2'><span>PROCEDURE</span></h2><div  class = 'S1'><span>Create a simple model. </span></div><div  class = 'S3'><img class = "imageNode" src = "" width = "838.8000000000001" alt = "" style = "vertical-align: baseline"></img></div><div  class = 'S1'><span>Reaction formulas are given as metabolites and their stoichiometric coefficient concatenated by +. Products and substrates are separated by a reversibility indicator, with </span><span style=' font-family: monospace;'>-&gt;</span><span> indicating an irreversible reaction and </span><span style=' font-family: monospace;'>&lt;=&gt;</span><span> indicating a reversible reaction.</span></div><div  class = 'S1'><span>The reactions are:</span></div><div  class = 'S1'><a href = "https://www.vmh.life/#reaction/PYRt2m"><span>Pyruvate mitochondrial transport via proton symport </span></a></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >PYRt2m = </span><span style="color: rgb(170, 4, 249);">'h[c] + pyr[c] &lt;=&gt; h[m] + pyr[m]'</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="5E2EA3A1" data-testid="output_0" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">PYRt2m = </span>h[c] + pyr[c] &lt;=&gt; h[m] + pyr[m]</div></div></div></div></div></div><div  class = 'S6'><a href = "https://www.vmh.life/#reaction/PDHm"><span>Pyruvate dehydrogenase</span></a></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >PDHm = </span><span style="color: rgb(170, 4, 249);">'nad[m] + pyr[m] + coa[m] -&gt; nadh[m] + co2[m] + accoa[m] '</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="17DC6360" data-testid="output_1" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">PDHm = </span>nad[m] + pyr[m] + coa[m] -&gt; nadh[m] + co2[m] + accoa[m] </div></div></div></div></div></div><div  class = 'S6'><a href = "https://www.vmh.life/#reaction/LDH_Lm"><span>L-lactate dehydrogenase</span></a></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >LDH_Lm = </span><span style="color: rgb(170, 4, 249);">'nad[m] + lac_L[m] &lt;=&gt; h[m] + nadh[m] + pyr[m]'</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="2625C328" data-testid="output_2" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">LDH_Lm = </span>nad[m] + lac_L[m] &lt;=&gt; h[m] + nadh[m] + pyr[m]</div></div></div></div></div></div><div  class = 'S6'><span>To be able to use </span><span style=' font-family: monospace;'>createModel</span><span> to build this model, we also have to define the reaction Identifiers and the reaction names:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >reactionIdentifiers = {</span><span style="color: rgb(170, 4, 249);">'PYRt2m'</span><span >, </span><span style="color: rgb(170, 4, 249);">'PDHm'</span><span >, </span><span style="color: rgb(170, 4, 249);">'LDH_Lm'</span><span >}</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="D4D1A122" data-testid="output_3" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">reactionIdentifiers = </span>    'PYRt2m'    'PDHm'    'LDH_Lm'</div></div></div></div></div><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >reactionNames = {</span><span style="color: rgb(170, 4, 249);">'Pyruvate mitochondrial transport via proton symport '</span><span >,</span><span style="color: rgb(14, 0, 255);">...</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S8'><span style="white-space: normal"><span >    </span><span style="color: rgb(170, 4, 249);">'Pyruvate dehydrogenase'</span><span >, </span><span style="color: rgb(170, 4, 249);">'L-lactate dehydrogenase'</span><span >}</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="84B0B81F" data-testid="output_4" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">reactionNames = </span>    'Pyruvate mitochondrial transport via proton symport '    'Pyruvate dehydrogenase'    'L-lactate dehydrogenase'</div></div></div></div></div></div><div  class = 'S6'><span>And we have to combine the reactions:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >reactionFormulas = {PYRt2m, PDHm, LDH_Lm}</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="B2D9146F" data-testid="output_5" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">reactionFormulas = </span>    'h[c] + pyr[c] &lt;=&gt; h[m] + pyr[m]'    'nad[m] + pyr[m] + coa[m] -&gt; nadh[m] + co2[m] + accoa[m] '    'nad[m] + lac_L[m] &lt;=&gt; h[m] + nadh[m] + pyr[m]'</div></div></div></div></div></div><div  class = 'S1'><span>Now we can call</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >model = createModel(reactionIdentifiers, reactionNames, reactionFormulas);</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="E5226057" data-testid="output_6" data-width="428" data-height="18" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">PYRt2m	h[c] + pyr[c] 	&lt;=&gt;	h[m] + pyr[m] </div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement scrollableOutput" uid="91738352" data-testid="output_7" data-width="428" data-height="18" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">PDHm	pyr[m] + nad[m] + coa[m] 	&lt;=&gt;	nadh[m] + co2[m] + accoa[m] </div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="8E1E724D" data-testid="output_8" data-width="428" data-height="18" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">LDH_Lm	nad[m] + lac_L[m] 	&lt;=&gt;	h[m] + pyr[m] + nadh[m] </div></div></div></div></div><div  class = 'S6'><span style=' font-style: italic;'></span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S9'></div></div></div><div  class = 'S6'><span>The reactions are:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >v1 = </span><span style="color: rgb(170, 4, 249);">' &lt;=&gt; A'</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="8063E1C1" data-testid="output_9" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v1 = </span> &lt;=&gt; A</div></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >v2 = </span><span style="color: rgb(170, 4, 249);">'A &lt;=&gt; B'</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="DB70B9B5" data-testid="output_10" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v2 = </span>A &lt;=&gt; B</div></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >v3 = </span><span style="color: rgb(170, 4, 249);">'A &lt;=&gt; C'</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="6E586207" data-testid="output_11" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v3 = </span>A &lt;=&gt; C</div></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >v4 = </span><span style="color: rgb(170, 4, 249);">'B &lt;=&gt; C'</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="0B01E587" data-testid="output_12" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v4 = </span>B &lt;=&gt; C</div></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >v5 = </span><span style="color: rgb(170, 4, 249);">'C &lt;=&gt; '</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="3D1089E5" data-testid="output_13" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v5 = </span>C &lt;=&gt; </div></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >v6 = </span><span style="color: rgb(170, 4, 249);">'B &lt;=&gt; '</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="2FC5B32C" data-testid="output_14" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v6 = </span>B &lt;=&gt; </div></div></div></div></div></div><div  class = 'S6'><span>To be able to use </span><span style=' font-family: monospace;'>createModel</span><span> to build this model, we also have to define the reaction Identifiers and the reaction names:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >reactionIdentifiers = {</span><span style="color: rgb(170, 4, 249);">'v1'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v2'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v3'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v4'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v5'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v6'</span><span >}</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="9C2A558D" data-testid="output_15" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">reactionIdentifiers = </span>    'v1'    'v2'    'v3'    'v4'    'v5'    'v6'</div></div></div></div></div><div class="inlineWrapper outputs"><div  class = 'S10'><span style="white-space: normal"><span >reactionNames = {</span><span style="color: rgb(170, 4, 249);">'v1'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v2'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v3'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v4'</span><span >, </span><span style="color: rgb(170, 4, 249);">'v5'</span><span >,</span><span style="color: rgb(170, 4, 249);">'v6'</span><span >}</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement" uid="7DF6ADD0" data-testid="output_16" data-width="428" data-height="20" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">reactionNames = </span>    'v1'    'v2'    'v3'    'v4'    'v5'    'v6'</div></div></div></div></div></div><div  class = 'S6'><span>And we have to combine the reactions:</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >reactionFormulas = {v1, v2, v3, v4, v5, v6}</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsVariableStringElement scrollableOutput" uid="A8B63B60" data-testid="output_17" data-width="428" data-height="20" data-hashorizontaloverflow="true" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><span class="variableNameElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">reactionFormulas = </span>    ' &lt;=&gt; A'    'A &lt;=&gt; B'    'A &lt;=&gt; C'    'B &lt;=&gt; C'    'C &lt;=&gt; '    'B &lt;=&gt; '</div></div></div></div></div></div><div  class = 'S1'><span>Now we can call</span></div><div class="CodeBlock"><div class="inlineWrapper outputs"><div  class = 'S4'><span style="white-space: normal"><span >model = createModel(reactionIdentifiers, reactionNames, reactionFormulas,</span><span style="color: rgb(170, 4, 249);">'lowerBoundList'</span><span >,[-100 -100 -100 -100 -100 -100],</span><span style="color: rgb(170, 4, 249);">'upperBoundList'</span><span >,[100 100 100 100 100 100]);</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="6B672A45" data-testid="output_18" data-width="428" data-height="18" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v1		&lt;=&gt;	A[c] </div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="2A3994D2" data-testid="output_19" data-width="428" data-height="18" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v2	A[c] 	&lt;=&gt;	B[c] </div></div><div class="inlineElement eoOutputWrapper embeddedOutputsTextElement" uid="6460C955" data-testid="output_20" data-width="428" data-height="59" data-hashorizontaloverflow="false" style="width: 458px; max-height: 261px; white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;"><div class="textElement" style="white-space: normal; font-style: normal; color: rgb(64, 64, 64); font-size: 12px;">v3	A[c] 	&lt;=&gt;	C[c] 
v4	B[c] 	&lt;=&gt;	C[c] 
v5	C[c] 	&lt;=&gt;	
v6	B[c] 	&lt;=&gt;	</div></div></div></div></div><div  class = 'S6'><span>Now we plot the reaction rates of v3,v4,v5:</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S11'><span style="white-space: normal"><span >bool=logical([0;0;1;1;1;0]);</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >model.S=full(model.S);</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S8'><span style="white-space: normal"><span >model.S(:,bool)</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsMatrixElement" uid="7F82A0A5" data-testid="output_21" data-width="428" style="width: 458px;"><div class="matrixElement veSpecifier"><div class="veVariableName variableNameElement" style="width: 428px;"><span>ans = </span><span class="veVariableValueSummary"></span></div><div class="valueContainer" data-layout="{&quot;columnWidth&quot;:43.2,&quot;totalColumns&quot;:&quot;3&quot;,&quot;totalRows&quot;:&quot;3&quot;,&quot;charsPerColumn&quot;:6}"><div class="variableValue" style="width: 131.6px;">    -1     0     0
     0    -1     0
     1     1    -1</div><div class="horizontalEllipsis hide"></div><div class="verticalEllipsis hide"></div></div></div></div></div></div></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S11'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%function plotregion(A,b,lb,ub,c,transp,points,linetyp,start_end)</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% The function plotregion plots closed convex regions in 2D/3D. The region</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% is formed by the matrix A and the vectors lb and ub such that Ax&gt;=b</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% and lb&lt;=x&lt;=ub, where the region is the set of all feasible x (in R^2 or R^3).</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% An option is to plot points in the same plot.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% Usage:   plotregion(A,b,lb,ub,c,transp,points,linetyp,start_end)</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% Input:</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% A - matrix. Set A to [] if no A exists</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% b - vector. Set b to [] if no b exists</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% lb - (optional) vector. Set lb to [] if no lb exists</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% ub - (optional) vector. Set ub to [] if no ub exists</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% c - (optional) color, example 'r' or [0.2 0.1 0.8], {'r','y','b'}.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%       Default is a random colour.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% transp - (optional) is a measure of how transparent the</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%           region will be. Must be between 0 and 1. Default is 0.5.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% points - (optional) points in matrix form. (See example)</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% linetyp - (optional) How the points will be marked.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%           Default is 'k-'.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% start_end - (optional) If a special marking for the first and last point</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%              is needed.</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% If several regions must be plotted A ,b, lb, ub and c can be stored as a cell array {}</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% containing all sub-set information (see example1.m and example3.m). </span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">% Written by Per Bergstrm 2006-01-16</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >c=[0.1,0.9,0.0];</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >transp=0.5;</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%points</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%linetyp</span></span></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span style="color: rgb(2, 128, 9);">%start_end</span></span></div></div></div><div  class = 'S6'><span>No constraints</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S11'><span style="white-space: normal"><span >figure;</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S8'><span style="white-space: normal"><span >plotregion([],[],model.lb(bool),model.ub(bool),[0.2 0.1 0.8],0.1)</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="CD611B84" data-testid="output_22" style="width: 458px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div></div><div  class = 'S6'><span>Inequality</span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S11'><span style="white-space: normal"><span >figure;</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >A=model.S(:,bool);</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >b=[0;0;0];</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S8'><span style="white-space: normal"><span >plotregion(A,b,model.lb(bool),model.ub(bool),[0.2 0.1 0.8],0.1)</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="1336D0F2" data-testid="output_23" style="width: 458px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >figure;</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >A=[model.S(:,bool);model.S(:,bool)];</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >b0=[0;0;0];</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >b=[b0-1;b0+1];</span></span></div></div><div class="inlineWrapper outputs"><div  class = 'S8'><span style="white-space: normal"><span >plotregion(A,b,model.lb(bool),model.ub(bool),[0.2 0.1 0.8],0.1)</span></span></div><div  class = 'S5'><div class="inlineElement eoOutputWrapper embeddedOutputsFigure" uid="79DDE8FF" data-testid="output_24" style="width: 458px;"><div class="figureElement"><img class="figureImage figureContainingNode" src="" style="width: 560px;"></div></div></div></div><div class="inlineWrapper"><div  class = 'S7'><span style="white-space: normal"><span >figure;</span></span></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span >plotregion([model.S(:,bool);-model.S(:,bool)],[0;0],model.lb(bool)*0,model.ub(bool),[0.2 0.1 0.8],0.1)</span></span></div></div></div><div  class = 'S6'><span></span></div><div class="CodeBlock"><div class="inlineWrapper"><div  class = 'S11'><span style="white-space: normal"><span style="color: rgb(14, 0, 255);">return</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >A=[model.S;-model.S];</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >b=[model.b;model.b];</span></span></div></div><div class="inlineWrapper"><div  class = 'S12'></div></div><div class="inlineWrapper"><div  class = 'S12'><span style="white-space: normal"><span >figure;</span></span></div></div><div class="inlineWrapper"><div  class = 'S13'><span style="white-space: normal"><span >plotregion(A,b,model.lb,model.ub,c,transp);</span><span style="color: rgb(2, 128, 9);">%,points,linetyp,start_end)</span></span></div></div></div><div  class = 'S6'><span style=' font-style: italic;'>Step by step methodology. This is the key section of the tutorial and must be a direct instructions. Use the active tense rather than the passive tense, for example, "Run flux balance analysis", instead of "Flux balance analysis was run". If the protocol naturally breaks into separate stages, then include subheadings and resume the numbered list. Include a TIMING callout with each subheading and state how long the section will take to complete. </span></div><div  class = 'S1'><span style=' font-style: italic;'>Highlight critical steps in the protocol that must be performed in a very precise manner e.g., where the input is crucial or the checking of computational solutions against the literature is required; thus providing the user with hints to maximize the likelihood of success. Make these clear with the heading ‘CRITICAL STEP’, followed by a brief explanation.  Include diagrams where appropriate. If the tutorial is complicated you should consider including a flow diagram to demonstrate how the stages fit together. </span></div><div  class = 'S1'><span style=' font-style: italic;'>Where there are alternative routes to reach the next stage of the protocol, please give enough background so that the reader will be able to make an informed decision on the route to choose. Letters of the Latin alphabet (A), B), C)...) should be used to identify the different options, and Roman numerals (i), ii), etc.) should be used to break down the appropriate steps.</span></div><div  class = 'S1'><span style=' font-style: italic;'>1. This step can be performed using option A or option B depending on whether...</span></div><div  class = 'S1'><span style=' font-style: italic;'>A. First option</span></div><div  class = 'S1'><span style=' font-style: italic;'>i. First part</span></div><div  class = 'S1'><span style=' font-style: italic;'>ii. Second part, etc.</span></div><div  class = 'S1'><span style=' font-style: italic;'>B. Second option</span></div><div  class = 'S1'><span style=' font-style: italic;'>i. First part</span></div><div  class = 'S1'><span style=' font-style: italic;'>ii. Second part, etc.</span></div><div  class = 'S1'><span style=' font-style: italic;'>If you wish to include subheadings, add the subheading at the start of the first step within that section and make the text italic. This formatting can also be used to include second level subheadings within the main procedure.</span></div><h2  class = 'S2'><span>TROUBLESHOOTING</span></h2><div  class = 'S1'><span style=' font-style: italic;'>Please include TROUBLESHOOTING callouts after steps where problems are encountered. Include full details of the problem and solutions in a later Troubleshooting section. </span></div><h2  class = 'S2'><span>TIMING</span></h2><div  class = 'S1'><span style=' font-style: italic;'>If possible, please include a timeline indicating the approximate time a step, or set of steps, will take e.g. Steps 1–3, 30 min.; Steps 6+7, 2 h. Provide this information as a summary at the end of the procedure, as a list. If you think it would be more user friendly you could refer to time needed for each section or detail what needs to be performed on each day of the protocol.</span></div><h2  class = 'S2'><span style=' font-style: italic;'>TROUBLESHOOTING</span></h2><div  class = 'S1'><span style=' font-style: italic;'>After key steps, include information on how to troubleshoot the most likely problems users will encounter with the tutorial. Ideally provide this information in the form ‘problem’, ‘possible reason’, ‘solution’. </span></div><h2  class = 'S2'><span>ANTICIPATED RESULTS</span></h2><div  class = 'S1'><span style=' font-style: italic;'>Include information about, or examples of, the likely outcome to users, for example, likely solution to an optimisation problem, etc. Include example that works very well and a second for that requires troubleshooting to obtain meaningful results. If not described in detail in the introduction, this is a good place to include directions on how to interpret and analyze the computational results including equations if necessary.</span></div><h2  class = 'S2'><span style=' font-style: italic;'>Acknowledgments</span></h2><div  class = 'S1'><span style=' font-style: italic;'>Please note an acknowledgments section can be included.</span></div><div  class = 'S1'><span style=' font-style: italic;'></span></div><h2  class = 'S2'><span>REFERENCES</span></h2><div  class = 'S1'><span style=' font-style: italic;'>plotregion.m by Per Bergstrom </span><a href = "https://nl.mathworks.com/matlabcentral/fileexchange/9261-plot-2d-3d-region"><span>https://nl.mathworks.com/matlabcentral/fileexchange/9261-plot-2d-3d-region</span></a></div><div  class = 'S1'><span style=' font-style: italic;'>List all references mentioned in the protocol. References are numbered sequentially as they appear in the text, figure legends, tables and boxes. Use superscript numbers to indicate a reference, for example 1 . Only one publication is given for each number, and footnotes are not used. Only papers that have been published or accepted by a named publication should be in the numbered list; meeting abstracts and papers in preparation should be mentioned in the text with a list of authors (or initials if any of the authors are co-authors of the present contribution). Patents should be included in the reference list. Published conference abstracts and URLs for web sites should be cited parenthetically in the text, not in the reference list; articles in formal, peer-reviewed online journals should be included in the reference list. Grant details and acknowledgments are not permitted as numbered references.</span></div><div  class = 'S1'><span style=' font-style: italic;'>All authors should be included in reference lists unless there are more than five, in which case only the first author should be given, followed by 'et al.'. Authors should be listed last name first, followed by a comma and initials of given names. Titles of cited articles are required and should be in Roman text and titles of books in italics; the first word of the title is capitalized, the title written exactly as it appears in the work cited, ending with a period. Journal names are italicized and abbreviated (with periods) according to common usage; refer to the National Library of Medicine for details. Volume numbers appear in bold. For book citations, the publisher and city of publication are required (e.g. John Wiley &amp; Sons,  Hoboken, New Jersey, USA, 2003). </span></div><div  class = 'S1'><span style=' font-style: italic;'>List all references mentioned in the protocol. Use the format given in the examples below:</span></div><div  class = 'S1'><span style=' font-style: italic;'>3. Helms, C. et al. A putative RUNX1 binding site variant between SLC9A3R1 and RAT9 is associated with susceptibility to psoriasis. Nat. Genet. 35, 349-356 (2003).</span></div><div  class = 'S1'><span style=' font-style: italic;'>4. Lovett, M. Direct selection of cDNAs with large genomic DNA clones. InMolecular Cloning: A Laboratory Manual Edn. 3 Vol. 2 (eds. Sambrook., J. &amp; Russell, D.W.) 11.98-11.133 (Cold Spring Harbor Laboratory Press, Cold Spring Harbor, New York, USA, 2001).</span></div><div  class = 'S1'><span style=' font-style: italic;'>5. Petroff, M.D. &amp; Stapelbroek, M.G. Blocked impurity band detectors. US Patent 4,586,960 filed 23 Oct. 1980, and issued 4 Feb. 1986.</span></div><div  class = 'S1'></div>
<br>
<!-- 
##### SOURCE BEGIN #####
%% Constraint-based modelling concepts
% *Note: This tutorial is a draft and needs completion. Contributions welcome!*
%% Author(s): Ronan Fleming 
%% Reviewer(s): 
%% INTRODUCTION
% _The purpose of the introduction is to enable readers to make a decision as 
% to the suitability of the protocol to their problem. Initially you should introduce 
% the technique under discussion. Include references to key papers where the protocol 
% has been used previously, including those published by your own group or to 
% reviews that discuss applications of the technique (see below for how to cite 
% references)._
%% PROCEDURE
% Create a simple model. 
% 
% 
% 
% Reaction formulas are given as metabolites and their stoichiometric coefficient 
% concatenated by +. Products and substrates are separated by a reversibility 
% indicator, with |->| indicating an irreversible reaction and |<=>| indicating 
% a reversible reaction.
% 
% The reactions are:
% 
% <https://www.vmh.life/#reaction/PYRt2m Pyruvate mitochondrial transport via 
% proton symport >

PYRt2m = 'h[c] + pyr[c] <=> h[m] + pyr[m]'
%% 
% <https://www.vmh.life/#reaction/PDHm Pyruvate dehydrogenase>

PDHm = 'nad[m] + pyr[m] + coa[m] -> nadh[m] + co2[m] + accoa[m] '
%% 
% <https://www.vmh.life/#reaction/LDH_Lm L-lactate dehydrogenase>

LDH_Lm = 'nad[m] + lac_L[m] <=> h[m] + nadh[m] + pyr[m]'
%% 
% To be able to use |createModel| to build this model, we also have to define 
% the reaction Identifiers and the reaction names:

reactionIdentifiers = {'PYRt2m', 'PDHm', 'LDH_Lm'}
reactionNames = {'Pyruvate mitochondrial transport via proton symport ',...
    'Pyruvate dehydrogenase', 'L-lactate dehydrogenase'}
%% 
% And we have to combine the reactions:

reactionFormulas = {PYRt2m, PDHm, LDH_Lm}
%% 
% Now we can call

model = createModel(reactionIdentifiers, reactionNames, reactionFormulas);
%% 
% 


%% 
% The reactions are:

v1 = ' <=> A'
v2 = 'A <=> B'
v3 = 'A <=> C'
v4 = 'B <=> C'
v5 = 'C <=> '
v6 = 'B <=> '
%% 
% To be able to use |createModel| to build this model, we also have to define 
% the reaction Identifiers and the reaction names:

reactionIdentifiers = {'v1', 'v2', 'v3', 'v4', 'v5', 'v6'}
reactionNames = {'v1', 'v2', 'v3', 'v4', 'v5','v6'}
%% 
% And we have to combine the reactions:

reactionFormulas = {v1, v2, v3, v4, v5, v6}
%% 
% Now we can call

model = createModel(reactionIdentifiers, reactionNames, reactionFormulas,'lowerBoundList',[-100 -100 -100 -100 -100 -100],'upperBoundList',[100 100 100 100 100 100]);
%% 
% Now we plot the reaction rates of v3,v4,v5:

bool=logical([0;0;1;1;1;0]);
model.S=full(model.S);
model.S(:,bool)
%%
%function plotregion(A,b,lb,ub,c,transp,points,linetyp,start_end)
% The function plotregion plots closed convex regions in 2D/3D. The region
% is formed by the matrix A and the vectors lb and ub such that Ax>=b
% and lb<=x<=ub, where the region is the set of all feasible x (in R^2 or R^3).
% An option is to plot points in the same plot.
%
% Usage:   plotregion(A,b,lb,ub,c,transp,points,linetyp,start_end)
%
% Input:
%
% A - matrix. Set A to [] if no A exists
% b - vector. Set b to [] if no b exists
% lb - (optional) vector. Set lb to [] if no lb exists
% ub - (optional) vector. Set ub to [] if no ub exists
% c - (optional) color, example 'r' or [0.2 0.1 0.8], {'r','y','b'}.
%       Default is a random colour.
% transp - (optional) is a measure of how transparent the
%           region will be. Must be between 0 and 1. Default is 0.5.
% points - (optional) points in matrix form. (See example)
% linetyp - (optional) How the points will be marked.
%           Default is 'k-'.
% start_end - (optional) If a special marking for the first and last point
%              is needed.
%
% If several regions must be plotted A ,b, lb, ub and c can be stored as a cell array {}
% containing all sub-set information (see example1.m and example3.m). 
%
% Written by Per Bergstrm 2006-01-16
c=[0.1,0.9,0.0];
transp=0.5;
%points
%linetyp
%start_end
%% 
% No constraints

figure;
plotregion([],[],model.lb(bool),model.ub(bool),[0.2 0.1 0.8],0.1)
%% 
% Inequality

figure;
A=model.S(:,bool);
b=[0;0;0];
plotregion(A,b,model.lb(bool),model.ub(bool),[0.2 0.1 0.8],0.1)
figure;
A=[model.S(:,bool);model.S(:,bool)];
b0=[0;0;0];
b=[b0-1;b0+1];
plotregion(A,b,model.lb(bool),model.ub(bool),[0.2 0.1 0.8],0.1)
figure;
plotregion([model.S(:,bool);-model.S(:,bool)],[0;0],model.lb(bool)*0,model.ub(bool),[0.2 0.1 0.8],0.1)
%% 
% 

return
A=[model.S;-model.S];
b=[model.b;model.b];

figure;
plotregion(A,b,model.lb,model.ub,c,transp);%,points,linetyp,start_end)
%% 
% _Step by step methodology. This is the key section of the tutorial and must 
% be a direct instructions. Use the active tense rather than the passive tense, 
% for example, "Run flux balance analysis", instead of "Flux balance analysis 
% was run". If the protocol naturally breaks into separate stages, then include 
% subheadings and resume the numbered list. Include a TIMING callout with each 
% subheading and state how long the section will take to complete._ 
% 
% _Highlight critical steps in the protocol that must be performed in a very 
% precise manner e.g., where the input is crucial or the checking of computational 
% solutions against the literature is required; thus providing the user with hints 
% to maximize the likelihood of success. Make these clear with the heading ‘CRITICAL 
% STEP’, followed by a brief explanation.  Include diagrams where appropriate. 
% If the tutorial is complicated you should consider including a flow diagram 
% to demonstrate how the stages fit together._ 
% 
% _Where there are alternative routes to reach the next stage of the protocol, 
% please give enough background so that the reader will be able to make an informed 
% decision on the route to choose. Letters of the Latin alphabet (A), B), C)...) 
% should be used to identify the different options, and Roman numerals (i), ii), 
% etc.) should be used to break down the appropriate steps._
% 
% _1. This step can be performed using option A or option B depending on whether..._
% 
% _A. First option_
% 
% _i. First part_
% 
% _ii. Second part, etc._
% 
% _B. Second option_
% 
% _i. First part_
% 
% _ii. Second part, etc._
% 
% _If you wish to include subheadings, add the subheading at the start of the 
% first step within that section and make the text italic. This formatting can 
% also be used to include second level subheadings within the main procedure._
%% TROUBLESHOOTING
% _Please include TROUBLESHOOTING callouts after steps where problems are encountered. 
% Include full details of the problem and solutions in a later Troubleshooting 
% section._ 
%% TIMING
% _If possible, please include a timeline indicating the approximate time a 
% step, or set of steps, will take e.g. Steps 1–3, 30 min.; Steps 6+7, 2 h. Provide 
% this information as a summary at the end of the procedure, as a list. If you 
% think it would be more user friendly you could refer to time needed for each 
% section or detail what needs to be performed on each day of the protocol._
%% _TROUBLESHOOTING_
% _After key steps, include information on how to troubleshoot the most likely 
% problems users will encounter with the tutorial. Ideally provide this information 
% in the form ‘problem’, ‘possible reason’, ‘solution’._ 
%% ANTICIPATED RESULTS
% _Include information about, or examples of, the likely outcome to users, for 
% example, likely solution to an optimisation problem, etc. Include example that 
% works very well and a second for that requires troubleshooting to obtain meaningful 
% results. If not described in detail in the introduction, this is a good place 
% to include directions on how to interpret and analyze the computational results 
% including equations if necessary._
%% _Acknowledgments_
% _Please note an acknowledgments section can be included._
% 
% 
%% REFERENCES
% _plotregion.m by Per Bergstrom_ <https://nl.mathworks.com/matlabcentral/fileexchange/9261-plot-2d-3d-region 
% https://nl.mathworks.com/matlabcentral/fileexchange/9261-plot-2d-3d-region>
% 
% _List all references mentioned in the protocol. References are numbered sequentially 
% as they appear in the text, figure legends, tables and boxes. Use superscript 
% numbers to indicate a reference, for example 1 . Only one publication is given 
% for each number, and footnotes are not used. Only papers that have been published 
% or accepted by a named publication should be in the numbered list; meeting abstracts 
% and papers in preparation should be mentioned in the text with a list of authors 
% (or initials if any of the authors are co-authors of the present contribution). 
% Patents should be included in the reference list. Published conference abstracts 
% and URLs for web sites should be cited parenthetically in the text, not in the 
% reference list; articles in formal, peer-reviewed online journals should be 
% included in the reference list. Grant details and acknowledgments are not permitted 
% as numbered references._
% 
% _All authors should be included in reference lists unless there are more than 
% five, in which case only the first author should be given, followed by 'et al.'. 
% Authors should be listed last name first, followed by a comma and initials of 
% given names. Titles of cited articles are required and should be in Roman text 
% and titles of books in italics; the first word of the title is capitalized, 
% the title written exactly as it appears in the work cited, ending with a period. 
% Journal names are italicized and abbreviated (with periods) according to common 
% usage; refer to the National Library of Medicine for details. Volume numbers 
% appear in bold. For book citations, the publisher and city of publication are 
% required (e.g. John Wiley & Sons,  Hoboken, New Jersey, USA, 2003)._ 
% 
% _List all references mentioned in the protocol. Use the format given in the 
% examples below:_
% 
% _3. Helms, C. et al. A putative RUNX1 binding site variant between SLC9A3R1 
% and RAT9 is associated with susceptibility to psoriasis. Nat. Genet. 35, 349-356 
% (2003)._
% 
% _4. Lovett, M. Direct selection of cDNAs with large genomic DNA clones. InMolecular 
% Cloning: A Laboratory Manual Edn. 3 Vol. 2 (eds. Sambrook., J. & Russell, D.W.) 
% 11.98-11.133 (Cold Spring Harbor Laboratory Press, Cold Spring Harbor, New York, 
% USA, 2001)._
% 
% _5. Petroff, M.D. & Stapelbroek, M.G. Blocked impurity band detectors. US 
% Patent 4,586,960 filed 23 Oct. 1980, and issued 4 Feb. 1986._
% 
%
##### SOURCE END #####
-->
</div></body></html>